package cn.lzy.demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description
 * @Author lzy
 * @Date 2023/12/3 17:07
 * @Version
 **/
public class TestDemo {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(JavaConfig.class);
        Dog dog = ctx.getBean(Dog.class);
        User user = ctx.getBean(User.class);
        System.out.println(dog == user.getDog());
    }
}
